﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace LyncServerExtension
{
    /// <summary>
    /// Class to represents a rule in a delegation policy.
    /// </summary>
    public sealed class LyncDelegationRule
    {
        /// <summary>
        /// Gets or sets the name of the operator account.
        /// This account name is matched against the web service user windows identity to know
        /// if the rule should be applied or not.
        /// </summary>
        /// <value>
        /// The name of the operator account.
        /// </value>
        public string OperatorAccountName { get; set; }


        /// <summary>
        /// Gets or sets the authorized owner sip.
        /// </summary>
        /// <value>
        /// The authorized owner sip.
        /// </value>
        public string AuthorizedOwnerSip { get; set; }

        /// <summary>
        /// Gets or sets the authorized delegates.
        /// </summary>
        /// <value>
        /// The authorized delegates.
        /// </value>
        [XmlArrayItem(ElementName="DelegateSip")]
        public List<string> AuthorizedDelegates { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="LyncDelegationRule"/> class.
        /// </summary>
        public LyncDelegationRule()
        {
            AuthorizedDelegates = new List<string>();
        }
    }
}
